<html>
<head><meta charset="utf-8"><title>bisecting #82437 · t-compiler/cargo-bisect-rustc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/index.html">t-compiler/cargo-bisect-rustc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html">bisecting #82437</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227810037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227810037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227810037">(Feb 25 2021 at 18:02)</a>:</h4>
<p>Issue reproduces on stable but not on nightly and beta, so I'd like to go back in time to find one nightly that reproduces the issue. </p>
<p>The issue is a SIGKILL after RAM memory depletes, so I wrote a basic "monitoring" script to check when the compilation eats too much RAM (under 300 mb free):</p>
<div class="codehilite"><pre><span></span><code>$  cat test.sh
#!/bin/sh
free=`vmstat | tail -n1 | tr -s &quot; &quot; | cut -d &#39; &#39; -f 5`
if [ &quot;$free&quot; -lt 300000 ]; then exit 127; fi
exit 0
</code></pre></div>
<p>Copied the repro in a new rust project,  then I execute:<br>
<code>cargo bisect-rustc --preserve --script=./test.sh --start=YYYY-MM-DD --end=YYYY-MM-DD</code></p>
<p>but I cannot identity a suitable <code>--end</code> that reproduces the SIGKILL</p>



<a name="227810064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227810064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227810064">(Feb 25 2021 at 18:02)</a>:</h4>
<p>makes sense my approach? suggestions?</p>



<a name="227810253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227810253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227810253">(Feb 25 2021 at 18:04)</a>:</h4>
<p>Your test script does not appear to invoke rustc?</p>



<a name="227826296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227826296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227826296">(Feb 25 2021 at 19:45)</a>:</h4>
<p>hmm your question rings as an alarm, so I checked <a href="https://github.com/rust-lang/cargo-bisect-rustc/blob/45b29a5618917bb190b7a63731557ac9a05aa726/src/toolchains.rs#L320">the code</a> for the <code>--script</code> <a href="https://github.com/rust-lang/cargo-bisect-rustc/blob/master/TUTORIAL.md#testing-with-a-script">feature</a>).</p>
<p>I'm afraid that it doesnt do what I expected, I thought it was meant to be executed <strong>after</strong> every iteration of cargo bisect to test some condition. The reality is that it runs <strong>instead</strong> of the default action (<code>cargo build</code>).</p>



<a name="227833886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227833886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227833886">(Feb 25 2021 at 20:32)</a>:</h4>
<p>Yeah, I use script feature extensively to do unconventional bisects.</p>



<a name="227833969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/227833969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#227833969">(Feb 25 2021 at 20:33)</a>:</h4>
<p>(also because bisect doesn't work on nixos otherwise)</p>



<a name="228103289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/228103289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#228103289">(Feb 28 2021 at 04:08)</a>:</h4>
<p>Hmm, I'm curious: why doesn't bisect-rustc work on NixOS without using <code>--script</code>?</p>



<a name="228121817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/228121817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#228121817">(Feb 28 2021 at 10:35)</a>:</h4>
<p>Probably because on NixOS rustc needs to be patched first to set the path in the <code>PT_INTERP</code> program table entry to where NixOS puts the dynamic linker. It doesn't put it in <code>/lib64/ld-linux-x86-64.so.2</code>, but somewhere in the nix store.</p>



<a name="228130081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting%20%2382437/near/228130081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/bisecting.20.2382437.html#228130081">(Feb 28 2021 at 13:15)</a>:</h4>
<p><a href="https://gist.github.com/nagisa/7ccb19e7a67a8ed6b027a186fe1a9378">https://gist.github.com/nagisa/7ccb19e7a67a8ed6b027a186fe1a9378</a> Is what my scripts end up looking like usually.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>